package com.gxa.uhome.service.impl;

import com.gxa.uhome.mapper.LogMapper;
import com.gxa.uhome.pojo.Log;
import com.gxa.uhome.service.LogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: qingyao
 * @date: 9:26 2021/6/9
 */
@Service("LogService")
public class LogServiceImpl implements LogService {
    @Resource
    LogMapper logMapper;
    @Override
    public List<Log> selectall(Integer page, Integer size) {
        return logMapper.selectall(page,size);
    }

    @Override
    public List<Log> select(String name, String star, String end, String type,Integer page, Integer size) {
        return logMapper.select(name, star, end, type,page,size);
    }

    @Override
    public Integer insert(String type, Integer adminId, String context) {
        Log log=new Log();
        log.setType(type);
        log.setAdminId(adminId);
        log.setContext(context);
        return logMapper.insert(log);
    }


}
